package com.kaba.xtzhgl.controller;

import com.kaba.bean.ResponseResult;
import com.kaba.bean.ResultCode;
import com.kaba.bean.SysDept;
import com.kaba.xtzhgl.service.SysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author lvmengjie
 * @Date 2021/3/10
 * @Description TODO
 */
@RestController
@RequestMapping("/sysdept")
@CrossOrigin
public class SysDeptContorller {
    @Autowired
    SysDeptService sysDeptService;

    @GetMapping("queryDept")
    public ResponseResult queryDept(){
        List<SysDept> list=sysDeptService.querydept();
        return ResponseResult.success(ResultCode.SUCCESS,list);
    }



    @GetMapping("querylistdept")
    public ResponseResult queryaaa(){
        List<SysDept> list=sysDeptService.list();
        return ResponseResult.success(ResultCode.SUCCESS,list);
    }



}
